<HTML><HEAD><TITLE>Clean.js</TITLE></HEAD><BODY>
<A NAME="_top_"></A><PRE><A HREF="index.html">Index Files</A> </PRE><HR/>
<H1>File Clean.js</H1>
 Provides a facade to all engine features. <P><DL><DT><B>Author:</B></DT><DD>Carlos Eduardo Goncalves</DD></DL></P>
<HR/>
<A HREF=#Clean>Clean</A><BR/>
<A HREF=#Clean.createSimpleMessage>Clean.createSimpleMessage</A><BR/>
<A HREF=#Clean.createMessage>Clean.createMessage</A><BR/>
<A HREF=#Clean.createFullMessage>Clean.createFullMessage</A><BR/>
<A HREF=#Clean.doGet>Clean.doGet</A><BR/>
<A HREF=#Clean.doPost>Clean.doPost</A><BR/>
<A HREF=#Clean.postFormById>Clean.postFormById</A><BR/>
<A HREF=#Clean.postFormByName>Clean.postFormByName</A><BR/>
<A HREF=#Clean.callWebService>Clean.callWebService</A><BR/>
<HR/>
<A NAME=Clean></A>
<H2>Constructor Clean</H2><PRE>function Clean()</PRE> <p>Clean facade constructor.</p><P></P><BR/><BR/>
<A NAME=Clean.createSimpleMessage></A>
<H2> Method Clean.createSimpleMessage</H2><PRE>Clean.createSimpleMessage = function(url, consumer, onError)</PRE> <p>Create a <code>Message</code> setting required properties.</p> <P><TABLE WIDTH="90%" BORDER=1><TR BGCOLOR=#BDB3C4><TD><B>Parameter</B></TD><TD><B>Description</B></TD></TR><TR><TD><I>url</I></TD><TD>Url to access. </TD></TR><TR><TD><I>consumer</I></TD><TD>Consumer id. </TD></TR><TR><TD><I>onError</I></TD><TD>Function that should be called at the onError event. </TD></TR></TABLE><DL><DT><B>Returns:</B></DT><DD>New <code>Message</code> instance.</DD></DL></P><BR/><BR/>
<A NAME=Clean.createMessage></A>
<H2> Method Clean.createMessage</H2><PRE>Clean.createMessage = function(url, xslt, consumer, doRefresh, onError)</PRE> <p>Create a <code>Message</code> setting main properties.</p> <P><TABLE WIDTH="90%" BORDER=1><TR BGCOLOR=#BDB3C4><TD><B>Parameter</B></TD><TD><B>Description</B></TD></TR><TR><TD><I>url</I></TD><TD>Url to access. </TD></TR><TR><TD><I>xslt</I></TD><TD>Xslt file used to parse the response. </TD></TR><TR><TD><I>consumer</I></TD><TD>Consumer id. </TD></TR><TR><TD><I>doRefresh</I></TD><TD>Indicates if the consumer must be refreshed. </TD></TR><TR><TD><I>onError</I></TD><TD>Function that should be called at the onError event. </TD></TR></TABLE><DL><DT><B>Returns:</B></DT><DD>New <code>Message</code> instance.</DD></DL></P><BR/><BR/>
<A NAME=Clean.createFullMessage></A>
<H2> Method Clean.createFullMessage</H2><PRE>Clean.createFullMessage = function(url, xslt, consumer, doRefresh, onError, onChange, onComplete)</PRE> <p>Create a <code>Message</code> setting all properties.</p> <P><TABLE WIDTH="90%" BORDER=1><TR BGCOLOR=#BDB3C4><TD><B>Parameter</B></TD><TD><B>Description</B></TD></TR><TR><TD><I>url</I></TD><TD>Url to access. </TD></TR><TR><TD><I>xslt</I></TD><TD>Xslt file used to parse the response. </TD></TR><TR><TD><I>consumer</I></TD><TD>Consumer id. </TD></TR><TR><TD><I>doRefresh</I></TD><TD>Indicates if the consumer must be refreshed. </TD></TR><TR><TD><I>onError</I></TD><TD>Function that should be called at the onError event. </TD></TR><TR><TD><I>onChange</I></TD><TD>Function that should be called at the onChange event. </TD></TR><TR><TD><I>onComplete</I></TD><TD>Function that should be called at the onComplete event. </TD></TR></TABLE><DL><DT><B>Returns:</B></DT><DD>New <code>Message</code> instance.</DD></DL></P><BR/><BR/>
<A NAME=Clean.doGet></A>
<H2> Method Clean.doGet</H2><PRE>Clean.doGet = function(msg)</PRE> <p>Transport message using HTTP GET method.</p> <P><TABLE WIDTH="90%" BORDER=1><TR BGCOLOR=#BDB3C4><TD><B>Parameter</B></TD><TD><B>Description</B></TD></TR><TR><TD><I>msg</I></TD><TD><code>Message</code> instance to transport. </TD></TR></TABLE><DL><DT><B>Returns:</B></DT><DD><code>Message</code> id generated by the engine.</DD></DL></P><BR/><BR/>
<A NAME=Clean.doPost></A>
<H2> Method Clean.doPost</H2><PRE>Clean.doPost = function(msg, value, encrypt)</PRE> <p>Transport message using HTTP POST method.</p> <P><TABLE WIDTH="90%" BORDER=1><TR BGCOLOR=#BDB3C4><TD><B>Parameter</B></TD><TD><B>Description</B></TD></TR><TR><TD><I>msg</I></TD><TD><code>Message</code> instance to transport. </TD></TR><TR><TD><I>value</I></TD><TD>Value to post. </TD></TR><TR><TD><I>encrypt</I></TD><TD><code>Boolean</code> flag that defines if post data must be encrypted. </TD></TR></TABLE><DL><DT><B>Returns:</B></DT><DD><code>Message</code> id generated by the engine.</DD></DL></P><BR/><BR/>
<A NAME=Clean.postFormById></A>
<H2> Method Clean.postFormById</H2><PRE>Clean.postFormById = function(msg, formId, encrypt)</PRE> <p>Locates a form using its id and transport it inside a  message using HTTP POST method.</p> <P><TABLE WIDTH="90%" BORDER=1><TR BGCOLOR=#BDB3C4><TD><B>Parameter</B></TD><TD><B>Description</B></TD></TR><TR><TD><I>msg</I></TD><TD><code>Message</code> instance to transport. </TD></TR><TR><TD><I>formId</I></TD><TD><code>HTMLForm</code> id attribute. </TD></TR><TR><TD><I>encrypt</I></TD><TD><code>Boolean</code> flag that defines if form data must be encrypted. </TD></TR></TABLE><DL><DT><B>Returns:</B></DT><DD><code>Message</code> id generated by the engine.</DD></DL></P><BR/><BR/>
<A NAME=Clean.postFormByName></A>
<H2> Method Clean.postFormByName</H2><PRE>Clean.postFormByName = function(msg, formName, encrypt)</PRE> <p>Locates a form using its name and transport it inside a  message using HTTP POST method.</p> <P><TABLE WIDTH="90%" BORDER=1><TR BGCOLOR=#BDB3C4><TD><B>Parameter</B></TD><TD><B>Description</B></TD></TR><TR><TD><I>msg</I></TD><TD><code>Message</code> instance to transport. </TD></TR><TR><TD><I>formName</I></TD><TD><code>HTMLForm</code> name attribute. </TD></TR><TR><TD><I>encrypt</I></TD><TD><code>Boolean</code> flag that defines if form data must be encrypted. </TD></TR></TABLE><DL><DT><B>Returns:</B></DT><DD><code>Message</code> id generated by the engine.</DD></DL></P><BR/><BR/>
<A NAME=Clean.callWebService></A>
<H2> Method Clean.callWebService</H2><PRE>Clean.callWebService = function(msg, rpc)</PRE> <p>Transport a <code>RemoteMethod</code> instance inside a message  using HTTP POST method.</p> <P><TABLE WIDTH="90%" BORDER=1><TR BGCOLOR=#BDB3C4><TD><B>Parameter</B></TD><TD><B>Description</B></TD></TR><TR><TD><I>msg</I></TD><TD><code>Message</code> instance to transport. </TD></TR><TR><TD><I>rpc</I></TD><TD><code>RemoteMethod</code> instance used to identify the web 		service to call, including its name and parameters. </TD></TR></TABLE><DL><DT><B>Returns:</B></DT><DD><code>Message</code> id generated by the engine.</DD></DL></P><BR/><BR/>
</BODY></HTML>
